package top.codedance.iotp.common.util;

public class DeviceIdUtil {

    /**
     * 返回终端设备id
     * @param deviceId
     * @param number
     * @return
     */
    public static String genConsoleDeviceId(String deviceId, int number){
        return "Console[" + number + "]::" + deviceId;
    }

    /**
     * 返回客户端管理设备id
     * @param deviceId
     * @return
     */
    public static String getClientManageDeviceId(String deviceId){
        return "Manage::" + deviceId;
    }

    /**
     * 通过设备编号判断是否是客户端
   * @param deviceId
     * @return
     */
    public static boolean checkIsClient(String deviceId){
        String[] split = deviceId.split("::");
        return split.length == 1;
    }
}
